x86/vmx: Don't leak host syscall MSR state into HVM guests
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Mar 2017 11:40:36 +0000 (12:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 14 Mar 2017 11:40:36 +0000 (12:40 +0100)
commit6289c3b7c4756bca341ba59e4e246706040f7919
treea0f1ebc85f727403040a4f8cdecb36a0d068f9bc
parent2e68fda962226d4de916d5ceab9d9d6037d94d45
x86/vmx: Don't leak host syscall MSR state into HVM guests

hvm_hw_cpu->msr_flags is in fact the VMX dirty bitmap of MSRs needing to be
restored when switching into guest context.  It should never have been part of
the migration state to start with, and Xen must not make any decisions based
on the value seen during restore.

Identify it as obsolete in the header files, consistently save it as zero and
ignore it on restore.

The MSRs must be considered dirty during VMCS creation to cause the proper
defaults of 0 to be visible to the guest.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
master commit: 2f1add6e1c8789d979daaafa3d80ddc1bc375783
master date: 2017-02-21 11:06:39 +0000
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vmx.c
xen/include/public/arch-x86/hvm/save.h